import { createContext, MutableRefObject } from 'react';
import { IConfigItemEngineProps } from '../web/index';

export default createContext(
  {} as {
    configEvents: MutableRefObject<IConfigItemEngineProps['callBackEvents']>;
    emit: IConfigItemEngineProps['emit'];
    configEventsApi: <T extends (...params: any) => Promise<any>>(props: {
      request: T;
      params: Parameters<T>[0];
      keys: string[];
    }) => ReturnType<T>;
    inbiz: any;
  },
);
